package com.peas.platform.module.icims.base.sys.adapter.repository.po;

import java.util.*;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 访问记录
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_visit`")
public class VisitPo extends BasePo {

    // 系统
    @Comment(value = "系统")
    @Size(max = 100, message = "系统不能超过100个字符")
    @TableField(value = "`system`", jdbcType = JdbcType.VARCHAR)
    private String system;

    // 系统名称
    @Comment(value = "系统名称")
    @Size(max = 100, message = "系统名称不能超过100个字符")
    @TableField(value = "`system_name`", jdbcType = JdbcType.VARCHAR)
    private String systemName;

    // 服务
    @Comment(value = "服务")
    @Size(max = 100, message = "服务不能超过100个字符")
    @TableField(value = "`service`", jdbcType = JdbcType.VARCHAR)
    private String service;

    // 服务名
    @Comment(value = "服务名")
    @Size(max = 100, message = "服务名不能超过100个字符")
    @TableField(value = "`service_name`", jdbcType = JdbcType.VARCHAR)
    private String serviceName;

    // 接口描述
    @Comment(value = "接口描述")
    @Size(max = 200, message = "接口描述不能超过200个字符")
    @TableField(value = "`interface_desc`", jdbcType = JdbcType.VARCHAR)
    private String interfaceDesc;

    // 接口地址
    @Comment(value = "接口地址")
    @Size(max = 200, message = "接口地址不能超过200个字符")
    @TableField(value = "`interface_url`", jdbcType = JdbcType.VARCHAR)
    private String interfaceUrl;

    // 处理类
    @Comment(value = "处理类")
    @Size(max = 100, message = "处理类不能超过100个字符")
    @TableField(value = "`clazz`", jdbcType = JdbcType.VARCHAR)
    private String clazz;

    // 处理方法
    @Comment(value = "处理方法")
    @Size(max = 100, message = "处理方法不能超过100个字符")
    @TableField(value = "`method`", jdbcType = JdbcType.VARCHAR)
    private String method;

    // 请求ContentType
    @Comment(value = "请求ContentType")
    @Size(max = 200, message = "请求ContentType不能超过200个字符")
    @TableField(value = "`req_content_type`", jdbcType = JdbcType.VARCHAR)
    private String reqContentType;

    // 请求Protocol
    @Comment(value = "请求Protocol")
    @Size(max = 200, message = "请求Protocol不能超过200个字符")
    @TableField(value = "`req_protocol`", jdbcType = JdbcType.VARCHAR)
    private String reqProtocol;

    // 请求Schema
    @Comment(value = "请求Schema")
    @Size(max = 200, message = "请求Schema不能超过200个字符")
    @TableField(value = "`req_scheme`", jdbcType = JdbcType.VARCHAR)
    private String reqScheme;

    // 请求PathInfo
    @Comment(value = "请求PathInfo")
    @Size(max = 200, message = "请求PathInfo不能超过200个字符")
    @TableField(value = "`req_path_info`", jdbcType = JdbcType.VARCHAR)
    private String reqPathInfo;

    // 请求PathTranslated
    @Comment(value = "请求PathTranslated")
    @Size(max = 200, message = "请求PathTranslated不能超过200个字符")
    @TableField(value = "`req_path_translated`", jdbcType = JdbcType.VARCHAR)
    private String reqPathTranslated;

    // 请求URI
    @Comment(value = "请求URI")
    @Size(max = 200, message = "请求URI不能超过200个字符")
    @TableField(value = "`req_request_uri`", jdbcType = JdbcType.VARCHAR)
    private String reqRequestUri;

    // 请求URL
    @Comment(value = "请求URL")
    @Size(max = 200, message = "请求URL不能超过200个字符")
    @TableField(value = "`req_request_url`", jdbcType = JdbcType.VARCHAR)
    private String reqRequestUrl;

    // 请求ContextPath
    @Comment(value = "请求ContextPath")
    @Size(max = 200, message = "请求ContextPath不能超过200个字符")
    @TableField(value = "`req_context_path`", jdbcType = JdbcType.VARCHAR)
    private String reqContextPath;

    // 请求QueryString
    @Comment(value = "请求QueryString")
    @TableField(value = "`req_query_string`", jdbcType = JdbcType.CLOB)
    private String reqQueryString;

    // 请求Method
    @Comment(value = "请求Method")
    @Size(max = 200, message = "请求Method不能超过200个字符")
    @TableField(value = "`req_method`", jdbcType = JdbcType.VARCHAR)
    private String reqMethod;

    // 请求AuthType
    @Comment(value = "请求AuthType")
    @Size(max = 200, message = "请求AuthType不能超过200个字符")
    @TableField(value = "`req_auth_type`", jdbcType = JdbcType.VARCHAR)
    private String reqAuthType;

    // 请求ServletPath
    @Comment(value = "请求ServletPath")
    @Size(max = 200, message = "请求ServletPath不能超过200个字符")
    @TableField(value = "`req_servlet_path`", jdbcType = JdbcType.VARCHAR)
    private String reqServletPath;

    // 请求SessionId
    @Comment(value = "请求SessionId")
    @Size(max = 200, message = "请求SessionId不能超过200个字符")
    @TableField(value = "`req_requested_session_id`", jdbcType = JdbcType.VARCHAR)
    private String reqRequestedSessionId;

    // 请求RemoteUser
    @Comment(value = "请求RemoteUser")
    @Size(max = 200, message = "请求RemoteUser不能超过200个字符")
    @TableField(value = "`req_remote_user`", jdbcType = JdbcType.VARCHAR)
    private String reqRemoteUser;

    // 请求RemoteAddr
    @Comment(value = "请求RemoteAddr")
    @Size(max = 200, message = "请求RemoteAddr不能超过200个字符")
    @TableField(value = "`req_remote_addr`", jdbcType = JdbcType.VARCHAR)
    private String reqRemoteAddr;

    // 请求RemoteHost
    @Comment(value = "请求RemoteHost")
    @Size(max = 200, message = "请求RemoteHost不能超过200个字符")
    @TableField(value = "`req_remote_host`", jdbcType = JdbcType.VARCHAR)
    private String reqRemoteHost;

    // 请求RemotePort
    @Comment(value = "请求RemotePort")
    @TableField(value = "`req_remote_port`", jdbcType = JdbcType.INTEGER)
    private Integer reqRemotePort;

    // 请求ServerName
    @Comment(value = "请求ServerName")
    @Size(max = 200, message = "请求ServerName不能超过200个字符")
    @TableField(value = "`req_server_name`", jdbcType = JdbcType.VARCHAR)
    private String reqServerName;

    // 请求ServerPort
    @Comment(value = "请求ServerPort")
    @TableField(value = "`req_server_port`", jdbcType = JdbcType.INTEGER)
    private Integer reqServerPort;

    // 请求LocalAddr
    @Comment(value = "请求LocalAddr")
    @Size(max = 200, message = "请求LocalAddr不能超过200个字符")
    @TableField(value = "`req_local_addr`", jdbcType = JdbcType.VARCHAR)
    private String reqLocalAddr;

    // 请求LocalName
    @Comment(value = "请求LocalName")
    @Size(max = 200, message = "请求LocalName不能超过200个字符")
    @TableField(value = "`req_local_name`", jdbcType = JdbcType.VARCHAR)
    private String reqLocalName;

    // 请求LocalPort
    @Comment(value = "请求LocalPort")
    @TableField(value = "`req_local_port`", jdbcType = JdbcType.INTEGER)
    private Integer reqLocalPort;

    // 请求Cookies
    @Comment(value = "请求Cookies")
    @TableField(value = "`req_cookies`", jdbcType = JdbcType.CLOB)
    private String reqCookies;

    // 请求ParameterMap
    @Comment(value = "请求ParameterMap")
    @TableField(value = "`req_parameter_map`", jdbcType = JdbcType.CLOB)
    private String reqParameterMap;

    // 请求TrailerFields
    @Comment(value = "请求TrailerFields")
    @TableField(value = "`req_trailer_fields`", jdbcType = JdbcType.CLOB)
    private String reqTrailerFields;

    // 请求Headers
    @Comment(value = "请求Headers")
    @TableField(value = "`req_headers`", jdbcType = JdbcType.CLOB)
    private String reqHeaders;

    // 响应Status
    @Comment(value = "响应Status")
    @TableField(value = "`resp_status`", jdbcType = JdbcType.INTEGER)
    private Integer respStatus;

    // 响应CharacterEncoding
    @Comment(value = "响应CharacterEncoding")
    @Size(max = 200, message = "响应CharacterEncoding不能超过200个字符")
    @TableField(value = "`resp_character_encoding`", jdbcType = JdbcType.VARCHAR)
    private String respCharacterEncoding;

    // 响应ContentType
    @Comment(value = "响应ContentType")
    @Size(max = 200, message = "响应ContentType不能超过200个字符")
    @TableField(value = "`resp_content_type`", jdbcType = JdbcType.VARCHAR)
    private String respContentType;

    // 响应Headers
    @Comment(value = "响应Headers")
    @TableField(value = "`resp_header`", jdbcType = JdbcType.CLOB)
    private String respHeader;

    // 访问请求ID
    @Comment(value = "访问请求ID")
    @Size(max = 200, message = "访问请求ID不能超过200个字符")
    @TableField(value = "`visit_request_id`", jdbcType = JdbcType.VARCHAR)
    private String visitRequestId;

    // 访问时间
    @Comment(value = "访问时间")
    @TableField(value = "`visit_time`", jdbcType = JdbcType.TIMESTAMP)
    private Date visitTime;

    // 访问用户ID
    // （用户表）外键
    @Comment(value = "访问用户ID")
    @TableField(value = "`visit_user`", jdbcType = JdbcType.BIGINT)
    private Long visitUser;

    // 访问耗时(毫秒)
    @Comment(value = "访问耗时(毫秒)")
    @TableField(value = "`visit_duration`", jdbcType = JdbcType.BIGINT)
    private Long visitDuration;

}
